package com.wy.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wy.entity.GoodsLogistics;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author 王渝
 */
@Mapper
public interface GoodsLogisticsMapper extends BaseMapper<GoodsLogistics> {

    /**
     * 查询15日没收获的订单
     * @return
     */
    @Select("SELECT order_id FROM goods_logistics\n" +
            "WHERE timestampdiff(hour,delivery_time,sysdate()) > 360\n" +
            "AND `status` = \"2\"")
    List<Long> getUnreceivedOrderIds();

}